package com.catsic.core.form;

import java.io.Serializable;
import java.util.Date;

import org.springframework.format.annotation.DateTimeFormat;

import com.catsic.base.BaseForm;
import com.catsic.core.status.UserStatus;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonFormat.Shape;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;

/**
 * ClassName: UserForm
 * Description: 用户Form
 * date: 2011年1月18日 下午10:24:26
 * author: yangyd
 */
@JsonInclude(Include.NON_NULL)
public class UserForm extends BaseForm implements Serializable{
	
	/**
	 */
	private static final long serialVersionUID = 2923522920178250596L;

	/**
	 * username: 登录昵称
	 */
	private String username;
	
	/**
	 * password:登录密码
	 */
	private String password;
	
	/**
	 * realname: 真实姓名
	 */
	private String realname;
	
	/**
	 * identity: 身份证号
	 */
	private String identity;
	
	/**
	 * mobile:手机号码
	 */
	private String mobile;

	/**
	 * email:邮箱
	 */
	private String email;
	
	/**
	 * description:角色描述
	 */
	private String description;
	
	/**
	 * organId:所属机构id
	 */
	private String organId;
	
	/**
	 * organName:所属机构名称
	 */
	private String organName;
	
	/**
	 * did:所属部门id
	 */
	private String departId;
	
	/**
	 * dname:所属部门名称
	 */
	private String departName;
	
	/**
	 * 用户状态
	 */
	private UserStatus status;
	
	/**
	 * 登录失败次数
	 */
	private Integer failureCount;
	
	/**
	 * 最后登录失败时间
	 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",shape = Shape.STRING,timezone = "GMT+8")
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	private Date lastLogin ;
	
	/**
	 * 密码最后修改时间
	 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",shape = Shape.STRING,timezone = "GMT+8")
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	private Date pwdLastUpdate;

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getRealname() {
		return realname;
	}

	public void setRealname(String realname) {
		this.realname = realname;
	}

	public String getIdentity() {
		return identity;
	}

	public void setIdentity(String identity) {
		this.identity = identity;
	}

	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getOrganId() {
		return organId;
	}

	public void setOrganId(String organId) {
		this.organId = organId;
	}

	public String getOrganName() {
		return organName;
	}

	public void setOrganName(String organName) {
		this.organName = organName;
	}

	public String getDepartName() {
		return departName;
	}

	public void setDepartName(String departName) {
		this.departName = departName;
	}

	public String getDepartId() {
		return departId;
	}

	public void setDepartId(String departId) {
		this.departId = departId;
	}

	public UserStatus getStatus() {
		return status;
	}

	public void setStatus(UserStatus status) {
		this.status = status;
	}

	public Integer getFailureCount() {
		return failureCount;
	}

	public void setFailureCount(Integer failureCount) {
		this.failureCount = failureCount;
	}

	public Date getLastLogin() {
		return lastLogin;
	}

	public void setLastLogin(Date lastLogin) {
		this.lastLogin = lastLogin;
	}

	public Date getPwdLastUpdate() {
		return pwdLastUpdate;
	}

	public void setPwdLastUpdate(Date pwdLastUpdate) {
		this.pwdLastUpdate = pwdLastUpdate;
	}
}
